#ifndef BUILDING_TYPE_HPP_INCLUDED
#define BUILDING_TYPE_HPP_INCLUDED

#include <map>
#include <string>
#include <vector>

#include "building_fwd.hpp"
#include "wml_node_fwd.hpp"

class building_type
{
public:
	static void init(wml::const_node_ptr node);
	static const_building_type_ptr get(const std::string& key);
	static std::vector<const_building_type_ptr> get_all();

	explicit building_type(wml::const_node_ptr node);

	const std::string& id() const { return id_; }
	int cost() const { return cost_; }

	int storage(const std::string& item) const;
private:
	std::string id_;
	int cost_;
	std::map<std::string, int> storage_;
};

#endif
